﻿using Dapper.Contrib.Extensions;
using System;
using System.Collections.Generic;
using System.Text;

namespace SXFramWork.Model
{
    /// <summary>
    /// 定时任务表
    /// </summary>
    [Table("SysJob")]
    public class SysJobEntity
    {
        /// <summary>
        /// Id
        /// </summary>		
        [ExplicitKey]
        public string Id { get; set; }
        /// <summary>
        /// 任务key
        /// </summary>			
        public string JobKey { get; set; }
        /// <summary>
        /// 分组名
        /// </summary>			
        public string Group { get; set; }
        /// <summary>
        /// 任务名称
        /// </summary>			
        public string Name { get; set; }
        /// <summary>
        /// 编码
        /// </summary>			
        public string Code { get; set; }
        /// <summary>
        /// 任务类名
        /// </summary>			
        public string JobClass { get; set; }
        /// <summary>
        /// 0 simple,1 Cron
        /// </summary>			
        public int TriggerType { get; set; }
        /// <summary>
        /// 开始时间
        /// </summary>			
        public DateTime StartTime { get; set; }
        /// <summary>
        /// 结束时间
        /// </summary>			
        public DateTime EndTime { get; set; }
        /// <summary>
        /// 状态(0停止1运行中2暂停3已完成4异常)
        /// </summary>			
        public int Status { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>			
        public DateTime CreateTime { get; set; }
        /// <summary>
        /// 触发器为Cron时候 Cron表达式
        /// </summary>
        public string Cron { get; set; }
        /// <summary>
        /// 触发器为simple时候的时间间隔
        /// </summary>
        public int Interval { get; set; }
        /// <summary>
        /// 触发器为simple时候的重复次数 0表示无限
        /// </summary>
        public int RepeatCount { get; set; }
    }
}
